//
//  KAYearTableViewCell.m
//  KeepAccounts
//
//  Created by honeyrr on 2017/10/29.
//  Copyright © 2017年 honeyrr. All rights reserved.
//

#import "KAYearTableViewCell.h"

@interface KAYearTableViewCell()
@property (weak, nonatomic) IBOutlet UIView *bgView;
@property (weak, nonatomic) IBOutlet UILabel *date;
@property (weak, nonatomic) IBOutlet UILabel *percent;
@property (weak, nonatomic) IBOutlet UILabel *money;

@end
@implementation KAYearTableViewCell

-(void)setYearDict:(NSDictionary *)yearDict
{
    _yearDict = yearDict;
    
    self.date.text = [yearDict[@"date"] substringToIndex:7];
    self.percent.text = yearDict[@"percent"];
    self.money.text = yearDict[@"money"];
    self.bgView.backgroundColor = yearDict[@"color"];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.bgView.layer.cornerRadius = 20;
    self.bgView.layer.masksToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
